package com.example.plat.controller;

import com.example.plat.enity.Place;
import com.example.plat.service.PlaceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(description = "地点管理")
@RestController
@RequestMapping("/place")
public class PlaceController {

    @Autowired
    PlaceService service;

    @ApiOperation("查询地点")
    @GetMapping
    public ResponseEntity<Place> getPlace(Long placeId){
        Place place = service.getPlace(placeId);
        return ResponseEntity.ok(place);
    }
}
